//
//  OnwerDetailCell.m
//  PropertyMananger
//
//  Created by Mansion on 16/12/31.
//  Copyright © 2016年 BH. All rights reserved.
//

#import "OnwerDetailCell.h"

@implementation OnwerDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (instancetype)cellWithTabelView:(UITableView *)tableView
{
static NSString * CellID = @"OnwerDetailCell";
    OnwerDetailCell * cell = [[OnwerDetailCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID];
    
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        
        self.titleLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.titleLabel];
       // self.titleLabel.backgroundColor = BHRandColor;
        
        self.titleLabel.textColor = BHColor(102, 102, 102);
        self.titleLabel.font = BHFont(15);
        self.titleLabel.textAlignment = NSTextAlignmentLeft;
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self).with.offset(15);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_offset(CGSizeMake(70, 25));
        }];
                
        self.infoLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.infoLabel];
       // self.titleLabel.backgroundColor = BHRandColor;
        
        self.infoLabel.textAlignment = NSTextAlignmentLeft;
        self.infoLabel.font = BHFont(15);
        self.infoLabel.textColor = BHColor(51, 51, 51);
        
        [self.infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.leading.equalTo(self.titleLabel.mas_trailing).with.offset(0);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(BHscreenW/2, 25));
        }];
        
    }
    return self;
}
@end
